﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Yule8xCommon.Applib
{
    public class ArrayUtil
    {
        public static void RandomArray<T>(ref IList<T> arra)
        {
            int count = arra.Count - 1;
            if (count < 1)
            {
                return;
            }
            T temp;
            for (int i = count; i > 0; i--)
            {
                Random rand = new Random();
                int p = rand.Next(i);
                temp = arra[p];
                arra[p] = arra[i];
                arra[i] = temp;
            }
        }
    }
}